package com.onadake.utils;


import java.util.Set;


/**
 * Provides functionality to unique code generation.
 * 
 * @author radek.hecl
 *
 */
public interface UniqueCodeGenerator {

    /**
     * Generates alphanumeric code with high probability this will be the unique one.
     * Result code has length as prefix.length() + 13.
     * 
     * @param prefix prefix of generated code
     * @return generated code
     */
    public String generateUniqueAlphanumeric(String prefix);

    /**
     * Generates multiple alphanumeric codes with high probability these will be the unique ones.
     * All codes has length as prefix.length() + 13.
     * 
     * @param prefix prefix of all generated codes
     * @param number number of codes to generate, must be greater than 0
     * @return generated codes
     */
    public Set<String> generateUniqueAlphanumericBulk(String prefix, int number);

}
